#https://www.yuque.com/haas506/vp2l2f/awkzi7rq0zqsuovn
import machine

adc = machine.ADC(pin)   # create an ADC object acting on a pin
val = adc.read_u16()     # read a raw analog value in the range 0-65535